//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "NoeudConcept.h"

#ifndef ReseauConceptsH
#include "ReseauConcepts.h"
#endif

#include <assert.h>

//---------------------------------------------------------------------------

#pragma package(smart_init)


__fastcall NoeudConcept::NoeudConcept() :
  NoeudReseau()
{
  FConcept = "";
}

__fastcall NoeudConcept::~NoeudConcept()
{
  DereferencerConcept();
}

void __fastcall NoeudConcept::SetConcept(AnsiString value)
{
  if(FConcept != value) {
    DereferencerConcept();
    FConcept = value;
    ReferencerConcept();
  }
}

void __fastcall NoeudConcept::SeReferencer(void)
{
  NoeudReseau::SeReferencer();
  ReferencerConcept();
}

void __fastcall NoeudConcept::SeDereferencer(void)
{
  DereferencerConcept();
  NoeudReseau::SeDereferencer();
}

void __fastcall NoeudConcept::ReferencerConcept(void)
{
  if (Reseau != NULL && FConcept.IsEmpty() == false)
    Reseau->ReferencerConcept(this, FConcept);
}

void __fastcall NoeudConcept::DereferencerConcept(void)
{
  if (Reseau != NULL && FConcept.IsEmpty() == false)
    Reseau->DeReferencerConcept(FConcept);
}
